import React, { Component } from 'react'
import { connect } from 'react-redux'
import Logined from './logined'
import Login from './login'
interface IProps{
   
        loginIn:boolean
    
}

 class My extends Component<IProps>{
  
    render() {
        //let {islogin} =  this.props.user
        return (
            <div>
               {
                   this.props.loginIn?<Logined/>:<Login/>
               }
            </div>
        )
    }
}
const state = (state: any) => {
    return {
        loginIn:state.loginIn
    }
}
const dispatch = (dispatch: any) => {
    return {
        
    }
}
export default connect(state, dispatch)(My) 

